import { createRouter, createWebHistory } from "vue-router";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      name: "layout",
      component: () => import("@/views/layout.vue"),
      children: [
        {
          path: "",
          name: "home",
          component: () => import("@/views/home.vue"),
        },
        {
          path: "category",
          component: import("@/views/category.vue")
        }
      ],
    },
    {
      path: "/login",
      name: "login",
      component: () => import("../views/login.vue")
    },
  ],
});

export default router;
